package com.atmilan.quartz.service;

import java.util.List;
import java.util.Map;

import com.atmilan.quartz.model.dto.buyer.MerchantProductSkuDTO;
import com.atmilan.quartz.model.dto.buyer.ProductSkuDTO;
import com.atmilan.quartz.model.entity.buyer.MerchantCustomer;
import com.atmilan.quartz.model.entity.buyer.MerchantSupplier;
import com.atmilan.quartz.model.entity.buyer.ProductSkuSupplier;

public interface IMerchantSupplierService {

    List<MerchantProductSkuDTO> getByMerchantIdAndProductId(Long merchantId, Long productId, Map<Long,String> supplierAll, List<ProductSkuSupplier> list , Map<Long,List <MerchantSupplier>> map, Map<String,List <MerchantSupplier>>   getByMerchantIdAndParentIdAndStateTrue, Map<Long,List <MerchantSupplier>> mmm1, Map<String,MerchantCustomer> mmc,Map<Long,List<ProductSkuDTO>> sku);

    /**
     * 获取商户 该商户下 所有供应商对该产品的报价
     * @param merchantId
     * @return
     */
    List<MerchantProductSkuDTO> getByMerchantIdAndProductId(Long merchantId, Long productId);
    
    Long insert(MerchantSupplier merchantSupplier);

    Map<String, List<MerchantSupplier>> getAllGroupByMerchantIdAndParentIdAndStateTrue();

    List<MerchantSupplier> getByMerchantId(Long merchantId);

    List<MerchantSupplier> getByParentMerchantId(Long parentMerchantId);

    List<MerchantSupplier> getByMerchantIdAndParentMerchantId(Long merchantId, Long parentMerchantId);
    
    List<MerchantSupplier> getByMerchantIdAndStateTrue(Long merchantId);

    Map<Long, List<MerchantSupplier>> getAllAndStateTrueGroupByMerchantIdAndSupplierIs0();

    Map<Long, List<MerchantSupplier>> getAllAndStateTrueGroupByMerchantId();

    List<MerchantProductSkuDTO> getByMerchantIdAndProductIdAndSku(Long merchantId, Long productId, Long skuId);

    boolean updateById(MerchantSupplier merchantSupplier);

    /**
     * 获取 直属供应商 的真是供应商
     * @param id
     * @return
     */
    List<MerchantSupplier> getByMerchantIdAndSupplierTypeIs0(Long id);

    /**
     * 获取 直属供应商 商户类型
     * @param id
     * @return
     */
    List<MerchantSupplier> getByMerchantIdAndSupplierTypeIs1(Long id);

}
